﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ProgNetComponentsDx.Options;

namespace SqlCeManager.Options
{
    public partial class OptionsForm : XtraForm
    {
        public OptionsForm()
        {
            InitializeComponent();
        }

        private void bbiSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.SelectNextControl(this.ActiveControl, true, false, false, true);

            if (OptionCache.SaveOptions())
                modeProvider1.CurrentMode = ProgNetComponentsDx.Enums.FormMode.Read;
            else
                this.ShowDxLngWarningDialog("WARN_OPTIONS_NOT_SAVED");
        }

        private void bbiEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            modeProvider1.CurrentMode = ProgNetComponentsDx.Enums.FormMode.Edit;
        }

        private void modeProvider1_CustomGetModes(object sender, ProgNetComponentsDx.Mode.CustomModeSettingsEventArgs e)
        {
            
        }
    }
}
